package com.whc.controller;

import com.whc.service.CommonService;
import lombok.AllArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.Map;

/**
 * @author wang-hai-cheng
 * @since 2021/12/11 13:01
 */
@RestController
@AllArgsConstructor
public class CommandController {
    CommonService commonService;

    @PostMapping("operation")
    public ResponseEntity<?> operation(@Valid @RequestBody Map<String, Object> body) {
        return ResponseEntity.ok(commonService.operation(body));
    }
}